home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Chipmunk Basic 3.2.8 / basic.man next >
Text File  |  1995-12-12  |  22KB  |  823 lines

  1.     BASIC(1)        chipmunk-basic v3.2             BASIC(1)
  2.  
  3.  
  4.     Chipmunk BASIC - 'BASIC' language interpreter
  5.     
  6.  
  7.     SYNOPSIS    ( UNIX )
  8.  
  9.     basic [ filename ]
  10.  
  11.     DESCRIPTION
  12.  
  13.     Chipmunk basic is an interpreter for the BASIC language. If a
  14.     filename parameter is given, then the named program file is
  15.     loaded and run as a Basic program.  
  16.  
  17.     Basic commands and statements can be entered and interpreted in
  18.     immediate mode or executed as program statements when the Basic
  19.     program is run.  A built-in line number based editor allows
  20.     program input from the console keyboard.  See below for the
  21.     commands the interpreter recognizes.
  22.     
  23.     FLAGS
  24.  
  25.     none
  26.  
  27.     COMMANDS
  28.         
  29.     Standard mumbleSoft-like Basic Commands:
  30.  
  31.     load STRINGEXPR
  32.  
  33.         Load a program into memory from the named file. The
  34.         program previously in memory is erased.  All
  35.         variables are cleared.  All lines in the file must
  36.         begin with a line number.  Line numbers do not
  37.         need to be in increasing order.
  38.  
  39.  
  40.     save STRINGEXPR
  41.  
  42.         Save the current program to a named file.
  43.  
  44.     new
  45.  
  46.         Erase the program in memory.  All files are closed and
  47.         all variables are cleared.
  48.  
  49.     clear
  50.  
  51.         All  variables are cleared.  All arrays and string
  52.         variables are deallocated.
  53.  
  54.     run { LINENUM }
  55.     run { STRINGEXPR { , LINENUM } }
  56.  
  57.         Begin execution of the program at the first line, or at
  58.         the specified line.  All variables are cleared.  If a
  59.         STRINGEXPR is given then the BASIC program with that name
  60.         file is loaded into memory first.  Program lines are
  61.         executed in line number order.
  62.  
  63.     cont
  64.  
  65.         CONTinue execution of the program on the next statement
  66.         after the statement on which the program stopped execution
  67.         due to a STOP command or an error.  See BUGS section.
  68.  
  69.     goto LINENUM
  70.  
  71.         This statement will transfer control to the line number
  72.         specified.  If the program is not running, then this
  73.         command will begin execution at the specified line
  74.         without clearing the variables.  An "Undefined line"
  75.         error will occur if LINENUM doesn't exist in the program.
  76.  
  77.     list
  78.         List the whole program.
  79.  
  80.     list 1-3
  81.         List lines 1 to 2
  82.  
  83.     list -2
  84.         List lines up to 1
  85.  
  86.     list 1
  87.         List line 1
  88.     
  89.     list 2-
  90.         List lines from 2 on
  91.  
  92.     merge STRINGEXPR
  93.  
  94.         Load a program into memory.  The previous program
  95.         remains in memory; if a line exists in both programs,
  96.         the newly loaded line is kept.
  97.  
  98.     renum STRINGEXPR VAL { , VAL { , VAL { , VAL} } }
  99.  
  100.         Renumber program lines.  By default, the new sequence
  101.         is 10,20,30,... The first argument is a new initial
  102.         line number; the second argument is the increment
  103.         between line numbers. The third and fourth arguments,
  104.         if present, specify a limiting range of old line numbers
  105.         to renumber.  RENUM can be used to move non-overlapping
  106.         blocks of code.
  107.      
  108.     edit LINENUM
  109.  
  110.         Edit a single line. If the exit from the edit is via a
  111.         cntrl-c then do not change the line.
  112.             i    insert till <return>
  113.             x    delete one char
  114.             A    append to end of line
  115.  
  116.     del LINENUM [ - LINENUM ]
  117.  
  118.         Delete a line or specified range of lines. If not found
  119.         then no lines will be deleted.
  120.  
  121.     exit
  122.     bye
  123.     quit
  124.  
  125.         Terminates the basic interpreter, ending program
  126.         execution and closing all files.
  127.  
  128.  
  129.     STATEMENTS
  130.  
  131.     { let } VAR = EXPR
  132.  
  133.         Assign a value to a variable.  Variable names can be up
  134.         to 31 significant characters, consisting of letters,
  135.         digits, underscores, and an ending dollar sign. 
  136.         Variable names are case insensitive.  Variables can
  137.         hold real numbers (IEEE double) or strings of up
  138.         to 254 characters.  If the variable name ends with a
  139.         "$" it holds strings, otherwise it holds numbers.  If a
  140.         statement starts with a variable name then an implied
  141.         LET is assumed.
  142.  
  143.     print or '?' VAL | STRINGVAL { [ , | ; ] VAL ... } { ; }
  144.     print #FNUM, VAL ...
  145.  
  146.         This command will print its parameters tab delimited.
  147.         If a semi-colon is used between parameters then no tab
  148.         is inserted between the parameters.  The print
  149.         output is terminated with a carriage return unless the
  150.         parameter list ends with a semi-colon.  If a file
  151.         descriptor is given then output is redirected to the
  152.         given file.  If a
  153.         
  154.             tab(VAL);
  155.             
  156.         is found in a print statement, then print output will
  157.         skip to the horizontal position specified by VAL.
  158.  
  159.     print { #FNUM, } using STRINGVAL ; VAR { [ , | ; ] VAR ... }
  160.     
  161.         Prints formatted numbers.  Legal characters for the
  162.         format string are: + * $ # . and trailing spaces.
  163.         
  164.         Examples:
  165.         
  166.             print using "**$###.##"; 1.23    ->  ****$1.23
  167.             print using "###.##"; 2.12345    ->    2.12
  168.             
  169.     
  170.     input { # FNUM , } { STRINGVAR | VAR { , VAR } }
  171.  
  172.     input "prompt"; { STRINGVAR | VAR  { , VAR } }
  173.  
  174.         Input from a terminal or from a file. If the input is
  175.         from the terminal then a prompt message can also be
  176.         added.
  177.         
  178.         All input to string variables is "line input"; a whole
  179.         input line will be read into one string variable.  This
  180.         usage is different from other versions Basic.
  181.  
  182.     get STRINGVAR
  183.     
  184.         Gets one character from the console keyboard.  Blocking.
  185.     
  186.     cls
  187.         Clear the terminals screen.  Leaves the cursor in the
  188.         upper left corner.  For Applesoft BASIC fans, the "home"
  189.         command will also do this.
  190.  
  191.     end
  192.  
  193.         Terminates program execution and returns to the command
  194.         prompt.  Not required.
  195.  
  196.     stop
  197.  
  198.         Stops the execution of the program and returns to
  199.         the command prompt.  Prints a "Break..." message.
  200.  
  201.     if EXPR then STATEMENT { : STATEMENT } { : else STATEMENT }
  202.     if EXPR then LINENUM
  203.     if EXPR
  204.  
  205.         The IF statement.  If the condition is true then the
  206.         STATEMENTS after the THEN are executed and the
  207.         statements after the ELSE are skipped.  If the
  208.         condition is false then the statements after the "else"
  209.         are executed instead.  If the item after "then" is a
  210.         line number then a goto is executed.
  211.         
  212.         If the condition is true and there is no THEN on the
  213.         same line, statements are executed until a line
  214.         with an ENDIF is found.  (block IF() ... ENDIF)
  215.  
  216.     for VAR = EXPR to EXPR { step EXPR }
  217.  
  218.         Beginning of a "for next" loop.  It takes a starting
  219.         value, a limit and an optional step argument.  If the
  220.         step value is negative, the variable counts down.  The
  221.         body of the loop is not executed if the end condition
  222.         is true initially.
  223.  
  224.         Example:
  225.             for i=1 to 10 : print i, : next i
  226.             rem prints the numbers from 1 through 10
  227.  
  228.     next { VAR }
  229.  
  230.         End of a "for next" loop.  If the termination
  231.         conditions are met then execution falls through to the
  232.         following statement, otherwise execution returns to the
  233.         statement following the corresponding "for" statement.
  234.         The "next" does not need a variable name parameter.  If
  235.         this is the case the innermost "for" loop is used.
  236.  
  237.     while { EXPR }
  238.  
  239.         Start of a WHILE loop. The loop is repeated until EXPR
  240.         is false. If EXPR is false at loop entry, then the loop
  241.         is not executed at all. A WHILE loop must be
  242.         terminated by a WEND statement.
  243.  
  244.     wend { EXPR }
  245.  
  246.         Terminating statement of a WHILE loop.  If EXPR is true
  247.         then exit the loop.  Only one WEND is allowed for each
  248.         WHILE.  A WHILE-WEND loop without a condition will loop
  249.         forever.
  250.  
  251.     gosub LINENUM
  252.  
  253.         Transfer command to a line number. Save return address
  254.         so that the program can resume execution at the
  255.         statement after the "gosub" command.  The recursion
  256.         depth is limited only by available memory.
  257.  
  258.     return
  259.  
  260.         Returns from the most recently activated subroutine
  261.         call (must have been called by gosub).
  262.  
  263.     on EXPR   goto  LINENUM { , LINENUM ... }
  264.     on EXPR   gosub LINENUM { , LINENUM ... }
  265.     on error goto  LINENUM
  266.  
  267.         This command will execute either a goto or a gosub to
  268.         the specified line number indexed by the value of EXPR.
  269.         
  270.         If the error form is used, only one linenumber is
  271.         allowed.  LINENUM is the line to which control is
  272.         transferred if an error occurs.  A GOTO or CONT statement
  273.         can be used to resume execution.  An error inside a named
  274.         SUB subroutine cannot be resumed from or CONTinued.
  275.  
  276.     sub NAME ( VAR { , VAR ... } }
  277.  
  278.         Subroutine entry.  May be called by a CALL statement or
  279.         by NAME. A SUB subroutine must be exited by a RETURN or
  280.         END SUB statement.  There should be only one RETURN or
  281.         END SUB statement per SUB subroutine.  The variables in
  282.         the VAR list become local variables. String and numeric
  283.         arguments are passed by value; array arguments must be
  284.         pre-dimensioned and are passed by reference.
  285.         
  286.         Example:
  287.             110  x = foo (7, j) : rem Pass 7 and j by value.
  288.             ...
  289.             2000 sub foo (x,y,z) : rem z is a local variable
  290.             2010   print x       : rem prints 7 the first time
  291.             2090 return (y+1)    : rem also restores x,y,z
  292.  
  293.  
  294.     select case EXPR
  295.     
  296.         Multi-way branch.  Executes the statements after the CASE
  297.         statement which matches the SELECT CASE expression, then
  298.         skips to the END SELECT statement.  If these is no match,
  299.         and a CASE ELSE statement is present, then execution
  300.         defaults to the statements following the CASE ELSE.
  301.         
  302.         Example:
  303.             200 select case x
  304.             210   case 2
  305.             ...
  306.             230   case 3, 4
  307.             ...
  308.             270   case else
  309.             ...
  310.             290 end select
  311.  
  312.  
  313.     dim VAR( d { , d { , d } } ) { , VAR( d { , d { , d } } ) }
  314.  
  315.         Dimension an array or list of arrays (string or numeric). 
  316.         A maximum of 4 dimensions can be used. The maximum
  317.         dimension size is limited by available memory. Legal
  318.         array subscripts are from 0 up and including the
  319.         dimension specified; d+1 elements are allocated.  All
  320.         arrays must be dimensioned before use.
  321.         
  322.         Example:
  323.             10 dim a(10)
  324.             20 for i=0 to 10
  325.             30   a(i) = i^2
  326.             40 next i
  327.             50 print a(5) : rem should print 25
  328.  
  329.     dim VAR { ( INT ) } as TYPENAME
  330.  
  331.         Create a record using a previously defined structure
  332.         definition. Optionally create an array of records.
  333.  
  334.     type TYPENAME
  335.     
  336.         Create a structure definition type.  Each field
  337.         requires a separate line.  Legal types are string,
  338.         integer and double.  The definition must conclude with
  339.         an END TYPE statement.  Use the DIM AS statement to
  340.         create records with the specified structure.
  341.         
  342.         Example:
  343.             300 type person
  344.             310   name as string * 32 : rem 31 max length
  345.             320   age as integer
  346.             330   weight as double
  347.             340 end type
  348.             400 dim friend1 as person
  349.             410 friend1.name = "bill"
  350.             420 print friend1.name, friend1.age
  351.  
  352.  
  353.     read VAR { , VAR }
  354.  
  355.         Read data from the DATA statements contained in the
  356.         program. List items can be either string or numeric
  357.         variables. Reading past the end the last DATA statement
  358.         generates an error.
  359.  
  360.     data ITEM { , ITEM }
  361.  
  362.         DATA statements contain the data used in the READ
  363.         statements. Items must be separated by commas.  The
  364.         items may be either numeric or string expressions,
  365.         corresponding to the type of variable being read.
  366.         Reading the wrong kind of object produces a "Type
  367.         mismatch" error.
  368.  
  369.     restore { LINENUM }
  370.  
  371.         The RESTORE statement causes the next READ to use the
  372.         first DATA statement in the program.  If a LINENUM is
  373.         given then the DATA statement on or after that
  374.         particular line is used next.
  375.  
  376.     rem or "`"
  377.  
  378.         A remark or comment statement.  Ignored by the program
  379.         during execution, however a REM statement can be the
  380.         target of a GOTO or GOSUB.
  381.  
  382.     open STRINGEXPR for { input|output|append } as # FNUM
  383.  
  384.         Open a file. The { input|output|append } parameter
  385.         specifies whether the file is to be read, written or
  386.         appended.  If STRINGEXPR is "stdin" for input or
  387.         "stdout" for output then the console will be used
  388.         instead of a file.  A "file not found" error will
  389.         occur if a non-existant file is specified in an OPEN
  390.         for input statement.
  391.  
  392.     close # FNUM
  393.  
  394.         Close a file. Releases the file descriptor and flushes
  395.         out all stored data.
  396.  
  397.     def fnNAME ( VAR { , VAR } ) = EXPR
  398.  
  399.         Define a user definable function.
  400.         
  401.         Example:
  402.             10 def fnplus(x,y) = x+y
  403.             20 print fnplus(3,5) : rem prints 8
  404.  
  405.     { let } mid$( STRINGVAR, EXPR1, EXPR2 ) = STRINGEXPR
  406.  
  407.         Insert STRINGEXPR into STRINGVAR starting at EXPR1 
  408.         for character length EXPR2.
  409.  
  410.     exec(STRINGEXPR)
  411.  
  412.         Executes STRINGEXPR as a statement or command. 
  413.         e.g. exec("print " + "x") will print the value of x.
  414.  
  415.     poke ADDR_EXPR, DATA_EXPR
  416.  
  417.         Poke a byte into a memory location. Unreasonable
  418.         addresses can cause bus-errors.
  419.  
  420.     push VAR { , VAR ... }
  421.  
  422.         Pushes one or more expressions or variables onto an
  423.         internal stack.  Expressions can be returned using the
  424.         POP function; variables can be returned by using the
  425.         POP statement.
  426.     
  427.     pop VAL
  428.  
  429.         POP statement (see also POP function). Pops VAL
  430.         variables off the internal stack, restoring the value
  431.         of those variables to their pushed values.
  432.     
  433.     NUMERIC FUNCTIONS
  434.  
  435.     sgn(VAL)
  436.  
  437.         Returns the sign of the parameter value.  Returns 1 if
  438.         the value is greater than zero , zero if equal to zero.
  439.         -1 if negative.
  440.  
  441.     abs(x)
  442.  
  443.         Returns the absolute value of x.
  444.  
  445.     int(x)
  446.  
  447.         Returns the integer value of x.  Truncates toward zero.
  448.  
  449.     sqr(x)
  450.  
  451.         Returns the square root of x.
  452.  
  453.     log(x)
  454.  
  455.         Returns the natural logarithm of x.
  456.  
  457.     exp(x)
  458.  
  459.         Returns e^x. e=2.7182818...
  460.  
  461.     sin(x)
  462.     cos(x)
  463.     atn(x)
  464.  
  465.         Trigonometric functions: sin, cosine and arctangent. 
  466.  
  467.     pi
  468.     
  469.         Returns pi, 3.14159265358979323... 
  470.  
  471.     rnd ( EXPR )
  472.  
  473.         Returns a random number between 0 and int(EXPR)-1 inclusive.
  474.         If EXPR is 1, then returns a fraction between 0 and 1.
  475.         If EXPR is negative then EXPR seeds the random number
  476.         generator.
  477.  
  478.     randomize EXPR
  479.  
  480.         Seeds the random number generator with the integer EXPR.
  481.  
  482.     len(STRINGEXPR)
  483.  
  484.         Returns the length of the string STRINGEXPR.
  485.  
  486.     val(STRINGEXPR)
  487.  
  488.         Value of the expression contained in STRINGEXPR.
  489.         STRINGEXPR may be a string literal, variable, function,
  490.         or expression.
  491.         
  492.         For example, VAL("1+sqr(4)") yields 3.
  493.  
  494.     asc(STRINGEXPR)
  495.  
  496.         Returns the ascii code for the first character of
  497.         STRINGEXPR.  A null string returns zero.
  498.  
  499.     instr(a$, b$ { , VAL } )
  500.  
  501.         Returns the position of the substring b$ in the string a$
  502.         or returns a zero if b$ is not a substring.
  503.         VAL is an optional starting position in a$
  504.  
  505.     eof(FILENUM)
  506.  
  507.         Returns true if the file specified by FILENUM has reached
  508.         the end of the file.
  509.  
  510.     pop
  511.  
  512.         POP function (see also POP statement). Pops one variable
  513.         value off the stack and returns that value (string or
  514.         numeric).
  515.         
  516.         (POP can be used as either a statement (with a
  517.         parameter) or a function (no parameter). Note that the
  518.         POP function, unlike the POP statement, does not
  519.         restore the value of the variable pushed, but only
  520.         returns the pushed value.  This use of the POP
  521.         statement is different from the Applesoft usage.)
  522.  
  523.     peek( ADDR { , VAL } )
  524.  
  525.         Returns the value of the byte in memory at address ADDR.
  526.         If VAL is 2 or 4, returns the value of the 16-bit or
  527.         32-bit word respectively (if correctly aligned).
  528.         If VAL is 8, returns the value of the numeric variable
  529.         located at ADDR.  peek(varptr(x),8) equals x.
  530.  
  531.     varptr( VAR | STRINGVAR )
  532.     
  533.         Returns the memory address of a variable.
  534.     
  535.     erl
  536.  
  537.         Returns the line number of the last error.  Zero if the
  538.         error was in immediate mode.  The variable errorstatus$
  539.         gives the error type.
  540.  
  541.     timer
  542.  
  543.         Returns a numeric value of elapsed of seconds from the
  544.         computers internal clock.
  545.  
  546.     
  547.     STRING FUNCTIONS
  548.  
  549.     x$ + y$
  550.  
  551.         String concatenation.  Result must be 254 characters or less.
  552.     
  553.     chr$(VAL)
  554.  
  555.         Returns the ascii character corresponding to the value
  556.         of VAL.
  557.  
  558.     str$( VAL { , EXPR } )
  559.  
  560.         Returns a string representation corresponding to VAL.
  561.         If EXPR is present then the string is padded to that
  562.         length.
  563.  
  564.     inkey$
  565.  
  566.         Return one character from the keyboard if input is
  567.         available. Returns a zero length string { "" } if no
  568.         keyboard input is available.  Non-blocking.  Can be used
  569.         for keyboard polling.
  570.  
  571.     input$( EXPR { , FILENUM } )
  572.  
  573.         Returns EXPR characters from file FILENUM. If f is not
  574.         present then get input from the console keyboard.
  575.  
  576.     mid$( a$, i { , j } )
  577.  
  578.         Returns a substring of a$ starting at the i'th
  579.         positions and j characters in length. If the second
  580.         parameter is not specified then the substring is taken
  581.         from the start position to the end of a$.
  582.  
  583.     right$(a$, EXPR )
  584.  
  585.         Returns the right EXPR characters of a$.
  586.  
  587.     left$(a$, EXPR )
  588.  
  589.         Returns the left EXPR characters of a$.
  590.  
  591.     field$( STRINGVAL, VAL { , STRINGVAL } )
  592.  
  593.         Returns the n-th field of the first string.  If the
  594.         optional string is present then use the first character
  595.         of that string as the field separator.  The default
  596.         separator is a space.  Similar to UNIX 'awk' fields.
  597.         
  598.         e.g.  field$("11 22 33 44", 3)  returns  "33"
  599.  
  600.     hex$( VAL { , EXPR } )
  601.     bin$( VAL { , EXPR } )
  602.  
  603.         Returns the hexadecimal or binary string representation
  604.         corresponding to VAL.  If EXPR is present then the
  605.         string is padded with zeros to make it that length.
  606.  
  607.     lcase$( STRINGVAL )
  608.  
  609.         Returns STRINGVAL in all lower case characters.
  610.  
  611.     errorstatus$
  612.  
  613.         Returns the error message for the last error.
  614.  
  615.  
  616.     OPERATORS
  617.  
  618.     The following mathematical operators  are available:
  619.  
  620.         ^    exponentiation
  621.         *    multiplication
  622.         /    division
  623.         mod    remainder
  624.         +    addition
  625.         -    subtraction
  626.  
  627.     logical operators: (any non-zero value is true)
  628.  
  629.             not    logical not
  630.  
  631.     bitwise operators:
  632.  
  633.             and    bitwise and
  634.             or    bitwise or
  635.             xor    bitwise exclusive-or
  636.  
  637.     comparison operators:
  638.  
  639.             <=    less than or equal
  640.             <>    not equal to
  641.             >=    greater than or equal
  642.             =    equal
  643.             >    greater than
  644.             <    less than
  645.  
  646.     x$=y$, x$<y$, x$>y$, x$<=y$, x$>=y$, x$<>y$
  647.  
  648.         String comparisons; result is 1 if true, 0 if false.
  649.         
  650.     Operator precedence (highest to lowest):
  651.  
  652.         ( )
  653.         not -{unary_minus} functions
  654.         ^
  655.         * / mod
  656.         + -
  657.         = < > <= >= <>
  658.         and
  659.         or xor
  660.  
  661.     
  662.     UNIX commands and functions:
  663.  
  664.     sys( STRINGVAL )
  665.  
  666.         UNIX system call.  The string parameter is given to
  667.         the shell as a command.
  668.  
  669.     argv$
  670.         Returns the UNIX shell command line arguments.
  671.  
  672.  
  673.     Macintosh commands:
  674.  
  675.     gotoxy VAL, VAL
  676.  
  677.         Set the horizontal and vertical location of the
  678.         text output cursor.  (0,0) is the upper left corner.
  679.  
  680.     moveto VAL, VAL
  681.  
  682.         Sets the (x,y) location of the graphics pen.
  683.  
  684.     lineto VAL, VAL
  685.  
  686.         Draws a line from the current pen location to location
  687.         (x,y) in the graphics window.
  688.  
  689.     window x, y, char_cols, char_lines
  690.  
  691.         Change the text console window position and size.
  692.  
  693.     morse STRINGVAL { , VAL, VAL, VAL, VAL }
  694.  
  695.         Plays morse code through the speaker.
  696.         The parameters are { dot-speed-wpm, volume{0..100},
  697.         word-speed-wpm, frequency_cps }
  698.  
  699.     sound VAL, VAL, VAL 
  700.  
  701.         The parameters are
  702.         { frequency_cps, seconds_duration, volume{0..100} }
  703.     
  704.     say STRINGVAL
  705.  
  706.         Speaks STRINGVAL if the Speech Manager Extension is
  707.         resident.  Try "say a$,200,46,1" for faster speech.
  708.  
  709.     open "SFGetFile" for input  as #FNUM
  710.     open "SFPutFile" for output as #FNUM
  711.  
  712.         Puts up a standard file dialog for the file name.
  713.  
  714.     files { STRINGVAL }
  715.     
  716.         Displays a listing of files in the named or current
  717.         directory.
  718.     
  719.     Macintosh functions:
  720.     
  721.     fre
  722.         Returns the amount of memory left for program use. 
  723.     
  724.     date$
  725.         Returns a string corresponding to the current date.
  726.  
  727.     time$
  728.         Returns a string corresponding to the current time.
  729.  
  730.     pos(VAL)
  731.  
  732.         Returns the horizontal position of the text cursor.
  733.         If VAL is negative returns the vertical position.
  734.     
  735.     errorstatus$
  736.     
  737.         Also returns the full path name of the program and
  738.         files opened by SFGetFile. (under System 7 and only
  739.         if the name fits in a string variable)
  740.     
  741.     
  742.     Macintosh menu items:
  743.  
  744.     Open or <cmd>O     will put up a dialog to allow selection
  745.             of a program file to load.  Basic Program file
  746.             names must end with a ".bas" suffix.
  747.  
  748.     Copy        will allow copying picts from the graphics
  749.             window.
  750.     
  751.     <cmd>.         Command-period will stop program execution.
  752.  
  753.     Print        Print graphics window if it's the front most window.
  754.             Only the graphics window can be printed.
  755.  
  756.  
  757.     CONVENTIONS
  758.  
  759.     EXPR        any expression that evaluates to a numeric value.
  760.     STRINGEXPR    a string expression.
  761.     VAR        a numeric variable.
  762.     STRINGVAR    a string variable. Name must end with a "$".
  763.     INTEGERVAR    a 16-bit variable. Name must end with a "%".
  764.     
  765.     All program lines must begin with a line number.  A line number
  766.     entered by itself will delete that program line. Using spaces
  767.     (indentation) between the line number and program statements is
  768.     legal.  Line numbers can be between 1 and 2147483647.
  769.     
  770.     Hexadecimal numbers can be entered by preceding them with
  771.     a "0x" as in 0x02ae, or by "&h" as in &h0172.
  772.     
  773.     Multiple statements may be given on one line, separated by
  774.     colons:
  775.  
  776.         10 INPUT X : PRINT X : STOP
  777.  
  778.  
  779.     DIAGNOSTICS
  780.  
  781.     Some errors can be caught by the user program using the "on error
  782.     goto" command. If no error trapping routine has been supplied
  783.     then program execution is terminated and a message is printed
  784.     with the corresponding line number.
  785.  
  786.     Graphics may require that the preferred memory requirements be
  787.     increased using the Finder "Get Info" dialog box.
  788.  
  789.  
  790.     AUTHORS
  791.     
  792.     David Gillespie wrote basic.p 1.0 and the p2c lib.
  793.     Ron Nicholson (rhn@netcom.com) added file i/o, graphics and
  794.     did the Unix, Macintosh and PowerMac port.  (1990-1995Nov)
  795.  
  796.     
  797.     BUGS
  798.  
  799.     Many.
  800.  
  801.     Can't CONTinue from an error inside a named SUB subroutine.
  802.     
  803.     PRINT USING format string doesn't recognize comma's or underscores.
  804.     
  805.     Integer VARs, like i%, don't work in FOR-NEXT statements. Integer
  806.     arrays can only have a dimension of one and will only work in
  807.     assignment (LET) statements.  All arithmetic on integer variables
  808.     is done using floating point arithmetic.
  809.  
  810.     Macintosh screen editing will only recognise the last line modified
  811.     before a RETURN or ENTER key.  The EDIT command and screen editing
  812.     are incompatible.
  813.  
  814.     There are several undocumented graphics and sprite commands
  815.     and keywords in the Macintosh port.  See the accompanying
  816.     README and quick-ref files.
  817.  
  818.  
  819.     Portions Copyright (C) 1989 Dave Gillespie
  820.     Copyright (C) 1994 Ronald H. Nicholson, Jr., All rights reserved.
  821.     "Applesoft" is a trademark of Apple Computer, Inc., etc.
  822.  
  823.